import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common'
import { VerRecordService } from './ver-record.service'
import { BaseController } from '@/base/base.controller'
import { VerRecord } from '@prisma/client'
import { VerRecordDto } from './dto/ver-record.dto'
import { ApiTags } from '@nestjs/swagger'
import { LvAuth } from '@/decorator/auth.decorator'
import { NormalAuth } from '@/decorator/normal.auth.decorator'

@ApiTags('核销')
@Controller('ver-record')
export class VerRecordController extends BaseController<VerRecord, VerRecordDto> {
  constructor(private readonly verRecordService: VerRecordService) {
    super(verRecordService)
  }

  @Patch('verify')
  async verifyRes(@Body() body: { ver_id: string; houseResId: string }) {
    return await this.verRecordService.verifyRes(body.ver_id, body.houseResId)
  }
}
